﻿@model NK.Mvc3.Models.SaleDetail

<tr @if (Model != null) {
    @:data-pkey="@Model.ID"
}>
    <td>
        @Html.DropDownList("ProductInfoID", String.Empty)
        @Html.ValidationMessageFor(model => model.ProductInfoID)
    </td>
    <td>
        @Html.DropDownList("SaleID", String.Empty)
        @Html.ValidationMessageFor(model => model.SaleID)
    </td>
    <td>
        @Html.EditorFor(model => model.Quantity)
        @Html.ValidationMessageFor(model => model.Quantity)
    </td>
    <td>
        @Html.EditorFor(model => model.CostSale)
        @Html.ValidationMessageFor(model => model.CostSale)
    </td>
    <td>
        @Html.EditorFor(model => model.TotalCost)
        @Html.ValidationMessageFor(model => model.TotalCost)
    </td>
    <td>
@if (ViewContext.RouteData.Values["Action"].ToString() == "Edit") {
        <button class="editRow">Save</button><button class="cancelEditRow">Cancel</button>
} else {
        <button class="createRow">Create</button><button class="cancelCreateRow">Cancel</button>
}
    </td>
</tr>
